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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: A = None
        self.v: G = None
        self.o: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: A = None
        self.z: B = None
        self.o: B = None
        self.t: A = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: A = None
        self.p: D = None
        self.x: E = None
        self.z: D = None
        self.o: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: A = None
        self.v: G = None
        self.o: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: A = None
        self.z: B = None
        self.o: B = None
        self.t: A = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: A = None
        self.p: D = None
        self.x: E = None
        self.z: D = None
        self.o: E = None
        self.txt = txt

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

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

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