class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: A = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: E = None
        self.q: G = None
        self.o: D = None
        self.w: F = None
        self.s: A = None
        self.u: E = None
        self.x: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: A = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: E = None
        self.q: G = None
        self.o: D = None
        self.w: F = None
        self.s: A = None
        self.u: E = None
        self.x: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: F = None
        self.txt = txt

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

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