class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: B = None
        self.x: E = None
        self.z: C = None
        self.u: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: A = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: C = None
        self.y: E = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: C = None
        self.u: B = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: A = None
        self.p: C = None
        self.u: B = None
        self.y: C = None
        self.t: B = None
        self.txt = txt

e = A("e")
b = B("b")
c = C("c")
i = D("i")
g = E("g")
n = F("n")
l = D("l")
h = C("h")

e.y = h
e.z = h
e.o = b
e.x = g
e.u = g
b.r = l
b.t = l
b.o = e
c.z = l
c.t = h
i.r = g
i.y = g
i.q = g
i.w = h
g.v = e
g.x = c
g.u = b
g.q = i
n.w = l
n.r = e
n.p = h
n.y = h
n.u = b
n.t = b
l.r = g
l.y = g
l.q = g
l.w = c
h.z = l
h.t = c
assert g.x.z.w.txt == "
class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: B = None
        self.x: E = None
        self.z: C = None
        self.u: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: A = None
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: C = None
        self.y: E = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: C = None
        self.u: B = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: A = None
        self.p: C = None
        self.u: B = None
        self.y: C = None
        self.t: B = None
        self.txt = txt

e = A("e")
b = B("b")
c = C("c")
i = D("i")
g = E("g")
n = F("n")
l = D("l")
h = C("h")

e.y = h
e.z = h
e.o = b
e.x = g
e.u = g
b.r = l
b.t = l
b.o = e
c.z = l
c.t = h
i.r = g
i.y = g
i.q = g
i.w = h
g.v = e
g.x = c
g.u = b
g.q = i
n.w = l
n.r = e
n.p = h
n.y = h
n.u = b
n.t = b
l.r = g
l.y = g
l.q = g
l.w = c
h.z = l
h.t = c
assert g.x.z.w.txt == "c"