class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: C = None
        self.z: A = None
        self.o: B = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: C = None
        self.z: A = None
        self.o: B = None
        self.txt = txt

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

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

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