class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.o: D = None
        self.t: F = None
        self.p: G = None
        self.r: G = None
        self.v: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

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

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

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

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

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