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

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

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

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

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

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

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

f = A("f")
g = B("g")
h = C("h")
a = D("a")
e = E("e")
d = F("d")
m = G("m")
j = A("j")
b = B("b")
n = C("n")

f.w = e
f.v = d
g.u = h
h.t = d
a.o = j
a.w = m
a.v = h
e.y = b
e.r = b
e.t = a
e.s = h
e.u = m
d.y = g
m.x = j
m.z = j
m.o = e
m.t = a
m.v = a
m.u = n
m.s = d
j.w = e
j.v = d
b.u = n
n.t = d
assert f.w.s.t.y.u.t.y.u.txt == "
class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: F = None
        self.txt = txt

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

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

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

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

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

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

f = A("f")
g = B("g")
h = C("h")
a = D("a")
e = E("e")
d = F("d")
m = G("m")
j = A("j")
b = B("b")
n = C("n")

f.w = e
f.v = d
g.u = h
h.t = d
a.o = j
a.w = m
a.v = h
e.y = b
e.r = b
e.t = a
e.s = h
e.u = m
d.y = g
m.x = j
m.z = j
m.o = e
m.t = a
m.v = a
m.u = n
m.s = d
j.w = e
j.v = d
b.u = n
n.t = d
assert f.w.s.t.y.u.t.y.u.txt == "h"