class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: F = None
        self.w: G = None
        self.p: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: F = None
        self.y: F = None
        self.s: F = None
        self.z: F = None
        self.w: C = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: F = None
        self.p: D = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: C = None
        self.z: C = None
        self.u: A = None
        self.t: G = None
        self.s: A = None
        self.v: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: D = None
        self.v: D = None
        self.t: E = None
        self.txt = txt

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

m = A("m")
b = B("b")
g = C("g")
f = D("f")
k = E("k")
j = F("j")
a = G("a")

m.t = k
m.y = j
m.w = a
m.p = a
b.x = g
b.w = g
b.q = j
b.y = j
b.s = j
b.z = j
b.v = a
g.o = k
g.s = j
g.p = f
g.u = b
f.q = j
f.x = g
f.z = g
f.u = m
f.s = m
f.t = a
f.v = a
k.s = b
k.q = b
k.x = f
k.u = f
k.v = g
j.x = f
j.p = f
j.v = f
j.t = k
a.q = g
assert m.y.t.v.u.v.q.u.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: F = None
        self.w: G = None
        self.p: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: F = None
        self.y: F = None
        self.s: F = None
        self.z: F = None
        self.w: C = None
        self.v: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: F = None
        self.p: D = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: C = None
        self.z: C = None
        self.u: A = None
        self.t: G = None
        self.s: A = None
        self.v: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: D = None
        self.v: D = None
        self.t: E = None
        self.txt = txt

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

m = A("m")
b = B("b")
g = C("g")
f = D("f")
k = E("k")
j = F("j")
a = G("a")

m.t = k
m.y = j
m.w = a
m.p = a
b.x = g
b.w = g
b.q = j
b.y = j
b.s = j
b.z = j
b.v = a
g.o = k
g.s = j
g.p = f
g.u = b
f.q = j
f.x = g
f.z = g
f.u = m
f.s = m
f.t = a
f.v = a
k.s = b
k.q = b
k.x = f
k.u = f
k.v = g
j.x = f
j.p = f
j.v = f
j.t = k
a.q = g
assert m.y.t.v.u.v.q.u.txt == "b"