class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: C = None
        self.x: D = None
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: A = None
        self.s: D = None
        self.z: B = None
        self.w: F = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: B = None
        self.v: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: A = None
        self.s: D = None
        self.z: B = None
        self.w: F = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: B = None
        self.v: D = None
        self.txt = txt

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

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