class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: C = None
        self.y: F = None
        self.r: G = None
        self.s: C = None
        self.p: C = None
        self.x: A = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: E = None
        self.q: H = None
        self.t: F = None
        self.r: F = None
        self.v: D = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: C = None
        self.y: F = None
        self.r: G = None
        self.s: C = None
        self.p: C = None
        self.x: A = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: E = None
        self.q: H = None
        self.t: F = None
        self.r: F = None
        self.v: D = None
        self.txt = txt

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

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

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