class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: E = None
        self.r: E = None
        self.s: G = None
        self.u: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: E = None
        self.t: G = None
        self.p: G = None
        self.w: A = None
        self.u: D = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: D = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: C = None
        self.s: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: E = None
        self.t: G = None
        self.p: G = None
        self.w: A = None
        self.u: D = None
        self.y: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.s: D = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: C = None
        self.s: B = None
        self.txt = txt

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

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

c.x = b
c.w = k
c.r = k
c.u = k
c.s = j
m.q = k
m.t = k
m.v = f
g.s = m
g.y = m
g.q = k
g.t = j
g.p = j
g.w = c
g.u = b
f.w = j
f.s = b
k.t = c
l.p = j
l.s = g
l.y = g
l.t = k
l.u = h
l.r = h
l.v = c
j.q = h
j.x = e
j.s = m
h.p = b
b.w = j
b.s = f
e.s = m
e.y = m
e.q = k
e.t = j
e.p = j
e.w = c
e.u = b
assert g.t.s.t.txt == "k"