class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: C = None
        self.v: D = None
        self.t: E = None
        self.o: D = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: H = None
        self.z: D = None
        self.r: E = None
        self.o: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: E = None
        self.txt = txt

g = A("g")
i = B("i")
n = C("n")
a = D("a")
l = E("l")
b = F("b")
f = G("f")
d = H("d")
c = F("c")
h = A("h")

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: H = None
        self.z: D = None
        self.r: E = None
        self.o: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: E = None
        self.txt = txt

g = A("g")
i = B("i")
n = C("n")
a = D("a")
l = E("l")
b = F("b")
f = G("f")
d = H("d")
c = F("c")
h = A("h")

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